﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ERPStore.Extensions;

namespace ERPStore.Exporter
{
	public class ProductUrlBuilder
	{
		public string GetProductUrl(ERPStore.Models.LeadSourceBase leadSource, ERPStore.Models.Product product)
		{
			var result = string.Format("http://{0}/produit/{1}/{2}/?estid={3}&utm_source={3}&estcd={4:yyMMdd}&utm_medium={5}"
				, GlobalConfiguration.Configuration.Settings.DefaultUrl
				, product.EncodedCode()
				, product.Link
				, leadSource.TrackSourceId
				, DateTime.Now
				, leadSource.Medium);

			return result;
		}
	}
}
